package net.sx.minemodule.mvp.model;

import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseItem;
import com.kedll.library.mvp.BaseModel;

import net.sx.minemodule.mvp.item.BrokerageListItem;

/**
 * add shibo.zheng
 * 19/07/08
 * 佣金明细model 数据请求成功放入此类
 */
public class BrokerageListModel extends BaseModel {

    /**
     * flag : 1                             //佣金标识 -1 支出 1 收入
     * price : 135                          //佣金
     * orderSn : SG13***SDG                 //订单编号
     * createTime: "2020-06-30 11:54:17"    //创建时间
     * commissionSource:                    //佣金来源
     */

    private int flag;
    private int price;
    private String orderSn;
    private String createTime;
    private String commissionSource;

    public String getCommissionSource() {
        return commissionSource;
    }

    public void setCommissionSource(String commissionSource) {
        this.commissionSource = commissionSource;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getFlag() {
        return flag == 1 ? "获得佣金" : "使用佣金";
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public String getPrice() {
        return String.valueOf(price);
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    @Override
    public BaseItem createItem(MultiTypeAdapter adapter) {
        return new BrokerageListItem(this);
    }
}
